-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Synthetics] Fix mobile synthetics image clipping #106128
[Synthetics] Fix mobile synthetics image clipping #106128
Conversation
Pinging @elastic/uptime (Team:uptime) |
805e443
to
d2eea2b
Compare
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dominiqueclarke I am ++ for doing this. I'll create an enhancement request. EDIT: Issue here: elastic/uptime#344 |
* Change hardcoded image size value to prevent clipping of mobile synthetics screenshots. * Compute max values for `ref`-style screenshots to improve display ux.
* Change hardcoded image size value to prevent clipping of mobile synthetics screenshots. * Compute max values for `ref`-style screenshots to improve display ux.
Summary
Resolves elastic/uptime#339.
The default sizes we use for images are hardcoded. They work well for landscape-shaped images; portrait-shaped images like the ones produced by mobile emulation are getting clipped by the hardcoded value.
We can limit the width to a
max-size
and allow height to match. The plus side of this solution is it's very simple, and it works for both image sizes. The drawback is it will reduce the size of the image we show for desktop-style images, but it will not clip anything. Users will also still have the ability to expand the screenshot to see it in the full-screen viewer mode.This is a minimum-viable fix. I am open to suggestions on how to make this better, especially if it means the existing experience won't change.
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers